import React from "react";
import { BorderOutlined, ColumnHeightOutlined } from "@ant-design/icons";
import { FloatButton } from "antd";

const FloatMenu: React.FC = () => {
  return (
    <>
      <FloatButton.Group shape="square" style={{ right: 20, bottom: 20 }}>
        <FloatButton
          onClick={() => {
            window.meta2d.fitView(true, 20);
          }}
          tooltip={"适合窗口大小"}
          icon={<BorderOutlined />}
        />
        <FloatButton
          onClick={() => {
            window.meta2d.fitView();
          }}
          tooltip={"短边适应窗口大小"}
          icon={<ColumnHeightOutlined />}
        />
      </FloatButton.Group>
    </>
  );
};

export default FloatMenu;
